package com.phms;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.io.IOException;

@SpringBootApplication
// 开启注解事务管理
@EnableTransactionManagement
@MapperScan("com.phms.mapper")
public class PhmsApp implements CommandLineRunner {
    public static void main(String[] args) {
        SpringApplication.run(PhmsApp.class, args);
    }

    public void run(String... args) throws Exception {

        String frontUrl = "http://127.0.0.1:8086/";
        try {
            Runtime.getRuntime().exec(
                    "cmd   /c   start  "+frontUrl);
        } catch (IOException e) {

            e.printStackTrace();
        }


    }

}
